#include <bits/stdc++.h>
using namespace std;
#define yes cout<<"YES"<<endl
#define no cout<<"NO"<<endl
using ll = long long;
void solve()
{
    
}
class Solution {
public:
    int missingNumber(vector<int>& nums) {
        int sum1 = 0, sum2 = 0;
        for(auto& ch:nums)
        {
            sum1 ^= ch;
        }
        for(int i=0;i<nums.size();i++)
        {
            sum2 ^= i;
        }
        return sum1 ^= sum2;
    }
};
int main()
{
    int t = 1;
    cin >> t;
    while(t--)
    {
        solve();
    }
   return 0;
}
